M=heroes3
LUA_TGT=$(TGT_DIR)/bin/lua/games
LUA_SOURCES=$(wildcard *.lua)
DATA_FILES=$(shell find data -type f)
DATA_DIRS=$(shell find data -type d)
TGT_DATA_FILES=$(foreach f,$(DATA_FILES),$(LUA_TGT)/$(M)/$(f))
TGT_DATA_DIRS=$(foreach f,$(DATA_DIRS),$(LUA_TGT)/$(M)/$(f))

include lua-copyfiles.mk

all :  copy_data

copy_data : $(TGT_DATA_DIRS) $(TGT_DATA_FILES)

$(TGT_DATA_DIRS) :
	mkdir -p $@

$(LUA_TGT)/$(M)/data/% : data/%
	cp $< $@

